Logo (klik voor homepage)
 
Extended BlockDriver Specification

Introduction
This standard is public domain. The drivers supplied are freely distributable but are copyrighted by their respective authors. If you intend to use the block drivers, please distribute the whole block driver package (inc sample source, this file, and the complete !SerialDev application) with your program, making sure that you are distributing the latest version.

The current release of BlockDrivers consists of two parts:

  • !SerialDev, details of which are given below, and
  • Serial, a monitoring application, details of which are supplied in the proram.

The !SerialDev application holds the drivers. Your application's !Run sequence you should check to see if <SerialDev$Path> is set, and if not, set it to your application directory, which should contain a Modules directory. The Modules directory should contain the minimim required BlockDrivers (i.e. Internal, InternalPC and Internal32) so that the program can at least use the computer's internal serial port(s).

The !SerialDev application contains a directory structure starting with Modules. This directory contains a number of further sub-directories, one for each BlockDriver. The actual BlockDriver is called Driver and resides in the sub-directory that carries its name.

The drivers each have their own directory just in case, possibly extensions with !Run files, modules, etc relating to the driver could be stored there. Of course, drivers know their own name and could load files into RMA on initialisation now and cause no problems.

New features  
From version 2.00 of the BlockDriver Specification onwards, the above structure has been extended such that !SerialDev tries to execute the !Boot file in each of the BlockDriver directories when it is first 'seen'. This allows any 3rd party expansion cards to load their drivers prior to using it's BlockDriver. One such example is the IIDual blockdriver.

The BlockDriver flags (at offset +&C4) have been extended to include additional features, such as a flags to identify 26 and 32 bit compatibility (see below). These extensions have been defined in such a way that compatibilty with previous versions of the BlockDriver Specification is kept.

A new module, called BlockDriver has been added to !SerialDev. This module provides support for serial ports that van only be accessed through their DeviceFS interface, such as the 2nd serial port on the IONIX pc. Additionaly, the module provides hooks for existing drivers to register themselves, so that the monitoring application !Serial can show some useful details about that port.

ARCterm users
ARCterm 7 1.44 and later use drivers of this specification. In this archive some other drivers are included which are dealt with below. Other programs that support block drivers are: Binkleyterm (2.11+), Hearsay 2 (2.17+), ARCfax (1.06+), ARCbbs (1.63+), RISCbbs (1.02+), Netway, !DialUp, !Enigma, !CableComm, etc.

C Programmers
C headers have been provided for C programmers. These have been taken from the original BlockDriver distribution by Hugo Fiennes and haven't yet been updated to include the Extended Specification. Additional information will be made available later.

BASIC programmers
BASIC/Assembler people should have no problems working it out either - a small application, 'Example' is provided which will work with any block driver module to provide a very simple terminal program. These have been taken from the original BlockDriver distribution by Hugo Fiennes and haven't yet been updated to include the Extended Specification. Additional information will be made available later.

Version history
  • 1.xx
    • Original release(s) by Hugo Fiennes.
  • 2.00
    • First release of the Extended BlockDriver Specification.
Internal driver
This is the driver that accesses the computer's internal serial port(s). Currently, there are three versions of the Internal driver.

  • Internal
    This is the original driver for 26-bit RISC OS systems, using Acorn wiring. Older systems, such as the A5000, are likely to prefer Acorn wiring above the more common PC wiring (see below).
  • InternalPC
    Same as the above, except that the more standard PC wiring is used.
  • Internal32  
    This driver provides support for the newer 32-bit versions of RISC OS. This driver is required when using the serial ports of the IYONIX pc. Furthermore it includes support for the 2nd serial port.

High speed
Please note that you need at least RISC OS 3.10 in order to use block type transfers. All hardware from the A5000 onwards, will support 38400, 57600 and 115200 baud automatically. Remember that these rates may well not be reliable due to the lack of FIFO on the serial chip of the earlier machines. These rates are acheived by writing directly to the serial chip, which is definitely not Acorn-approved. Beware! On RiscPCs all rates to 115200 should be perfectly reliable as the hardware now includes a FIFO.

Acorn wiring
Acorn 9-way female -> Modem 25-way male
    1, 4, 8 -> 20
    2 -> 3
    3 -> 2
    5 -> 7
    6 -> 5
    7 -> 4
    9 -> 8
PC wiring
Acorn 9-way female -> Modem 25-way male
    1 -> 8
    2 -> 3
    3 -> 2
    4 -> 20
    5 -> 7
    6 -> 6 (generally not used)
    7 -> 4
    8 -> 5
    9 -> 22


Serial Port Dual Serial
Again, there are 2 versions: SP_Dual and SP_DualPC, the PC version expects a standard PC serial cable. Since release 1.09, the Xon/Xoff flags are cleared every time flow control is changed to stop things sticking if an Xoff has been received.

PipeA and PipeB
This will autoload the ARCbbs_Pipes module (contained in the PipeA directory) if necessary.

The idea is, you open a port (0-15) on pipeA and data sent appears in the input of the corresponding port on pipeB (and vice-versa). DTR at one end is translated to DCD at the other (ditto for RTS-CTS). In this way, any application which supports the block driver spec can talk to another, for example, with ARCbbs and the ARCterm modem server on the same machine, some ARCbbs ports could be given over to network access via the modem server.

The pipes use the flag 'wont empty' as you can't wait for the pipe to 'finish sending' as the other end of the pipe may be waiting for the same thing (unlike a serial port, where the data will go away eventually).

The pipes are 2k long in each direction.

Acorn Telnet
Note: Does not store R14_SVC
Note: Needs Acorn's TCP/IP protocol suite

This is only in testing, but is supplied as it might be useful. The coding is possibly quite inefficient, but it works. You require !Internet and !Telnet to have been run before trying to use the driver. It will prompt for a host name - type one, or an internet address. You can add ',xx' where xx is the port number to telnet into. DCD as reported by modem status will go high when a sucessful connection is made. Dropping DTR then raising it again will clear any current call.

Known bugs: You can't have multiple sessions - if you load another emulator and run telnet the port_claim message will stop the first one - possibly a 'dynamic' port number (returned by init?) should be put into the spec to cater for things like this.

Dummy (/dev/null)
This is a dummy driver, for when you want somewhere to trash data. It always shows CTS, DSR and DCD, and will completely ignore any data you send to it. It never has any data to give you.

IIDual driver    
This driver supports the Intelligent Interface Dual Serial card. From version 2.00 of the BlockDrivers onwards, the IIDual drivers are 26/32-bit neutral, which means they should run on all RISC OS systems, including the all 32-bit RISC OS 5.

Up to 8 IIDual card are supported, which allows the use of a maximum of 16 serial ports. The required device driver (i.e. the IIDual module) is loaded by !SerialDev on startup.

Driver layout
When writing your own BlockDriver, you need to know the internal organisation of a BlockDriver. Details of the driver layout are given in a text file following the link below. A better and more detailed description will be made available in the future.
 Driver layout


Klik voor homepage © Copyright Paul Reuvers X-Ample Technology bv  support@xat.nl Last changed: Tue,11 May 2004.13:31:58